package com.jblog.article.service;

import com.jblog.article.model.Category;
import com.jblog.common.exception.ParentDefinedException;
import com.jblog.common.exception.RecordAlreadyExistsException;
import com.jblog.common.exception.RecordNotFoundException;

public interface CategoryService {

	/**创建文章类别
	 * @throws ParentDefinedException 
	 * @throws RecordAlreadyExistsException */
	public void add(Category category) throws ParentDefinedException, RecordAlreadyExistsException;
	
	/**
	 * 修改文章类别
	 * @param category
	 * @throws ParentDefinedException 
	 */
	public void update(Category category) throws ParentDefinedException;
	
	/**
	 * 根据id查询类别
	 * @param id
	 * @return
	 * @throws RecordNotFoundException
	 */
	public Category find(String id) throws RecordNotFoundException;
}
